//
//  LLTextField.m
//  UI_02_homework
//
//  Created by 洛洛大人 on 16/6/6.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "LLTextField.h"

@interface LLTextField()<UITextFieldDelegate>

@end

@implementation LLTextField

-(instancetype) initWithFrame:(CGRect)frame withPlaceholder:(NSString *)placeholder {
    self = [super initWithFrame:frame];
    if(self) {
        self.placeholder = placeholder;
        self.textAlignment = NSTextAlignmentLeft;
        self.textColor = [UIColor blackColor];
        self.borderStyle = UITextBorderStyleRoundedRect;
        self.layer.masksToBounds = YES;
        self.layer.borderWidth = 1;
        self.layer.cornerRadius = 5;
        self.clearButtonMode = UITextFieldViewModeWhileEditing;
        
        self.delegate = self;
    

    }
    return self;
 }

-(BOOL)textFieldShouldReturn:(UITextField *)textField {
    [textField resignFirstResponder];
    return YES;
}








@end
